package day019.ioStream;

import java.io.FileOutputStream;
import java.io.IOException;

public class OutputStreamDemo3 {
    public static void main(String[] args) throws IOException {
        FileOutputStream fos = new FileOutputStream("D:\\ideaProjects\\javase_code\\study-practice" +
                "\\src\\day019\\ioStream\\day019_demo\\b.txt", true);
        fos.write(97);
        fos.write("\r\n".getBytes());
        fos.write(98);
        fos.write("\r\n".getBytes());
        fos.write(99);
        fos.write("\r\n".getBytes());

        fos.close();

        method1();
    }

    public static void method1() throws IOException {
        FileOutputStream fos = new FileOutputStream("D:\\ideaProjects\\javase_code\\study-practice\\" +
                "src\\day019\\ioStream\\day019_demo\\c.txt", true);
        fos.write(97);
        fos.write("\r\n".getBytes());
        fos.write(98);
        fos.write("\r\n".getBytes());
        fos.write(99);
        fos.write("\r\n".getBytes());

        fos.close();
    }
}
